$(function(){
    var str = '';
    $.each(allData.index,function(i,v){
        //特卖
        $.each(v.shangchuangtemai[0].te1,function(i,v){
            str = `
            <li class="first">
                <a href="javascript:void(0)" data-id="${v.te1Id}">
                  <div class="p-name">${v.te1Title}</div>
                  <div class="p-desc">${v.te1Desc}</div>
                  <div class="p-img p-img-scale">
                    <img src="${v.te1Img}"
                  </div>
                </a>
              </li>
            `;
            $('.second-content').children('ul').eq(1).append(str);
        })

        $.each(v.shangchuangtemai[0].te2,function(i,v){
            str = `
            <li>
                <a href="javascript:void(0)" data-id="${v.te2Id}">
                  <div class="p-name">${v.te2Title}</div>
                  <div class="p-desc">${v.te2Desc}</div>
                  <div class="p-img p-img-scale">
                    <img src="${v.te2Img}">
                  </div>
                </a>
              </li>
            `;
            $('.second-content ul').eq(1).append(str);
        })

        //新品
        $.each(v.shangchuangtemai[0].xinpin,function(i,v){
            str = `
            <li>
                <a href="javascript:void(0)" data-id="${v.xinId}">
                  <div class="p-name">${v.xinTitle}</div>
                  <div class="p-desc">${v.xinDesc}</div>
                  <div class="p-img p-img-scale">
                    <img src="${v.xinImg}">
                  </div>
                </a>
              </li>
            `;
            $('.second-content').children('ul').eq(2).append(str);
        })

        $.each(v.shangchuangtemai[0].paihangbang,function(i,v){
            str = `
            <li>
                <a href="javascript:void(0)" data-id="${v.paiId}">
                  <div class="p-img">
                    <img src="${v.paiImg}" alt="">
                  </div>
                  <div class="p-name">${v.paiTitle}</div>
                  <div class="p-price">¥${v.paiPrice}</div>
                  <i class="ph-icon ph-icon${i+1}">${i+1}</i>
                </a>
              </li>
            `;
            $('.com-ul').append(str);
        })
    })
})